import {useMessage} from 'naive-ui'

const useMsg = () => {
  const message = useMessage()
  const success = (text: string) => {
    message.success(text)
  }
  const error = (text: string) => {
    message.error(text)
  }
  return {
    success,
    error
  }
}

export default useMsg
